﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace UI.Lib
{
    public class RemoteFile
    {
        private string name = "";
        private string lastver = "";
        private int size = 0;
        private string lastUpTime = "";
        private bool needRestart = false;

        public string Name { get { return name; } }
        public string LastVer { get { return lastver; } }
        public int Size { get { return size; } }
        public bool NeedRestart { get { return needRestart; } }
        public string LastUpTime { get { return lastUpTime; } }

        public RemoteFile(XmlNode node)
        {
            this.name = node.Attributes["name"].Value;
            this.lastver = node.Attributes["lastver"].Value;
            this.size = Convert.ToInt32(node.Attributes["size"].Value);
            this.needRestart = Convert.ToBoolean(node.Attributes["needRestart"].Value);
            this.lastUpTime = node.Attributes["lastwrtime"].Value;
        }
    }
}
